Mobile electronic devices such as personal digital assistants (PDAs) and digital cellular telephones are increasingly including applications written in the Java™ programming language. Many of these mobile devices include operating systems written in programming languages other than Java. To increase system stability, it would be desirable to implement all or part of the operating system using the Java programming language. However, manipulating low-level system data structures such as page tables, registers, interrupts, and task structures is difficult in Java. Such low-level structures typically are bit-based structures or complex structures with field sizes that cannot be represented directly in Java structures. For example, there is no way to create in Java a field of five bits that corresponds physically to only five bits in memory. Enhancements to improve the ability to manipulate low-level system data structures in Java™ applications are desirable.